/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function CarBooking() {
    this.javaClass = "limousine.vo.Lookup";
    this.tableId = 0;
    this.lookupId = "";
    this.lookupName = "";
    this.lookupValue = "";
    this.lookupDescription = "";
    this.lookupGroupId = "";
    this.lookupOrder = 0;
}
function search(offset) {
    try {
        var ls = service.search(offset, $d("lookupNameSearch").value);
        var scount = service.getCount( $d("lookupNameSearch").value);
        //alert("count:"+ scount);
        var jTable = new JTable();
        jTable.setTableId("lookupTable");
        jTable.setColumns(["Name", "Value", "Description", "Group Id"]);
        jTable.setFields(["lookupName","lookupValue","lookupDescription", "lookupGroupId"]);
        jTable.setEditFunction("editLookup");
        jTable.setDeleteFunction("removeLookup");
        jTable.setAlignment("cols[3]='center';cols[4]='center'");
        jTable.setDataId("tableId");
        jTable.setCount(scount);
        jTable.setOffset(offset);
        jTable.setDataPageSize(20);
        jTable.setPageLink("searchLookup");
        jTable.setTableHeader();
        jTable.loadData(ls);
    } catch(err) {
        alert(err);
    }
}

